package org.jeese;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.Banner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.support.SpringBootServletInitializer;
import org.springframework.cache.annotation.EnableCaching;
import org.springframework.scheduling.annotation.EnableScheduling;
@EnableCaching
@EnableScheduling
@SpringBootApplication
public class Application extends SpringBootServletInitializer {
	private static final Logger logger = LoggerFactory.getLogger(Application.class);

	@Override
	protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
		application.bannerMode(Banner.Mode.OFF);
		return application.sources(Application.class);
	}
	
	public static void main(String[] args) {
		SpringApplication application = new SpringApplication(Application.class);
		//可以关闭banner或者控制banner的输出，可以输出到控制台上、输出到log中
		application.setBannerMode(Banner.Mode.OFF);// 关闭启动Banner 
		//application.setBannerMode(Banner.Mode.CONSOLE);// 输出Banner到控制台  
		//application.setBannerMode(Banner.Mode.LOG);// 输出Banner到日志中
		//启动dev配置文件
		//application.setAdditionalProfiles("dev");   // dev 、test、或prod
		application.run(args);
		logger.info("==================== web启动结束 ====================");
	}
}
